package ro.ase.catalog.security.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import ro.ase.catalog.beans.Grade;
import ro.ase.catalog.beans.Student;
import ro.ase.catalog.beans.Teacher;
import ro.ase.catalog.beans.dto.GradeDTO;
import ro.ase.catalog.security.dao.IGradeDAO;
import ro.ase.catalog.security.service.IGradeService;

import java.util.Date;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Ioana
 * Date: 6/14/14
 * Time: 3:02 PM
 * To change this template use File | Settings | File Templates.
 */
public class GradeServiceImpl implements IGradeService {
    @Autowired
    private IGradeDAO gradeDAO;
    public List<GradeDTO> displayGradesByStudent(Student student, Teacher teacher) {
        return gradeDAO.displayGradesByStudent(student,teacher);
    }



    public void saveGrade(Grade grade) {
        gradeDAO.save(grade);
    }

    public List<GradeDTO> displayGradesByStudent(Student student, Teacher teacher, Date date) {
        return gradeDAO.displayGradesByStudent(student, teacher, date);
    }

    public IGradeDAO getGradeDAO() {
        return gradeDAO;
    }

    public void setGradeDAO(IGradeDAO gradeDAO) {
        this.gradeDAO = gradeDAO;
    }
}
